package com.learn.service;

/**
 * 内部类
 */
public class InnerClass {
    private int a = 1;
    private  InnerClass() {
        //new Inner().print();
    }

    public String doWork(String name) {

        return new RepairRobot().doWork(name);
    }

    public class RepairRobot {
        public String doWork(String name){
            System.out.println(name);
            return name;
        }
    }

    class Inner{
        private int a = 2;
        public void print() {
            int a = 3;
            System.out.println( a );
            System.out.println(this.a);
            System.out.println(InnerClass.this.a);
        }
    }
}
